package com.wgo.bpot.domain.common;

import java.util.Set;

public interface UserRole {
    public String getName();
	public void setName(String name);
	public void addServicePrivilege(ServicePrivilege servicePrivilege);
	public void removeServicePrivilege(ServicePrivilege servicePrivilege);
	public Set<UserRole> getNestedUserRoles();
	public void addNestedUserRole(UserRole userRole);
	public void removeNestedUserRole(UserRole userRole);
    /**
     * Returns all service privileges, including any that exist in nested roles. 
     * No duplicate privileges (same name) are returned.
     */
    public Set<ServicePrivilege> getServicePriviliges();
    public boolean isAllowed(ServicePrivilege... servicePrivileges);
//    public <T> boolean isAllowedIfApplicable(Service service, CrudOperation operation, Class<T> conceptType, T conceptInstance);
}
